# todo: docker
# On windows - just install wsl2 (see https://docs.microsoft.com/en-us/windows/wsl/install-win10 )
# then ubuntu, preferably 18.04lts
# after that, just use ubuntu commands. 

# might use this, for skipping prompts during installation
export DEBIAN_FRONTEND=noninteractive #not really helping
# 
sudo apt-get install wget ca-certificates
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang elixir inotify-tools nodejs npm yarn python git
mix local.hex --force
mix local.rebar --force
mix archive.install hex phx_new 1.5.5

# postgres:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
# create default user postgre with password postgres in database postgres
# (that's what phoenix expects by default. see /config/dev.exs)
sudo -u postgres psql postgres
\password postgres
postgres
postgres
quit

# now you are good to go. feel free to add here if I missed something or contact me